from typing import Optional
from pydantic import BaseModel, Field

class CameraConfigBase(BaseModel):
    camera_type: str = Field(example="MV-CS050-10GM-PRO", description="相机类型")
    frame_rate: int = Field(example=30, description="图像采集帧率")
    exposure_time: int = Field(example=10000, description="图像采集曝光时间")
    gain: float = Field(example=1.0, description="增益")
    agc: bool = Field(example=False, description="自动增益")
    resolution: str = Field(example="1920x1080", description="分辨率")

class CameraConfigCreate(CameraConfigBase):
    pass

class CameraConfigUpdate(CameraConfigBase):
    id: int = Field(example=1, description="配置ID") 